home *** CD-ROM | disk | FTP | other *** search
-
-
-
- LLLLOOOOCCCCKKKK((((DDDD3333)))) LLLLOOOOCCCCKKKK((((DDDD3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- LOCK - acquire a basic lock
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////kkkkssssyyyynnnncccchhhh....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ddddddddiiii....hhhh>>>>
-
- iiiinnnntttt LLLLOOOOCCCCKKKK((((lllloooocccckkkk____tttt ****_l_o_c_k_p,,,, ppppllll____tttt _p_l))));;;;
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _l_o_c_k_p Pointer to the basic lock to be acquired.
-
- _p_l The interrupt priority level to be set while the lock is held
- by the caller.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- LOCK sets the interrupt priority level in accordance with the value
- specified by _p_l and acquires the lock specified by _l_o_c_k_p. If the lock is
- not immediately available, the caller will busy-wait until the lock is
- available.
-
- RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
- Upon acquiring the lock, LOCK returns the previous mask for use by
- UNLOCK. Your driver should treat this return integer as an "opaque"
- value and should not try to compare it with any other value or perform
- any operation on it.
-
- UUUUSSSSAAAAGGGGEEEE
- Because some implementations require that interrupts that might attempt
- to acquire the lock be blocked on the processor on which the lock is
- held, portable drivers must specify a _p_l value that is sufficient to
- block out any interrupt handler that might attempt to acquire this lock.
- See the description of the _m_i_n__p_l argument to _LLLL_OOOO_CCCC_KKKK______AAAA_LLLL_LLLL_OOOO_CCCC(D3) for
- additional discussion and a list of the valid values for _p_l.
-
- LLLLeeeevvvveeeellll
- Base or Interrupt.
-
- SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
- Driver-defined sleep locks may be held across calls to this function.
-
- Driver-defined basic locks and read/write locks may be held across calls
- to this function subject to the hierarchy -- but basic locks must be
- unlocked in the reverse order in which they were acquired (first-in,
- last-out).
-
- WWWWaaaarrrrnnnniiiinnnnggggssss
- Basic locks are not recursive. A call to LOCK attempting to acquire a
- lock that is currently held by the calling context will result in
- deadlock.
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- LLLLOOOOCCCCKKKK((((DDDD3333)))) LLLLOOOOCCCCKKKK((((DDDD3333))))
-
-
-
- Calls to LOCK should honor the hierarchy ordering to avoid deadlock.
-
- When called from interrupt level, the _p_l argument must not specify a
- priority level below the level at which the interrupt handler is running.
-
- RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
- LOCK_ALLOC(D3), LOCK_DEALLOC(D3), LOCK_DESTROY(D3), LOCK_INIT(D3),
- TRYLOCK(D3), UNLOCK(D3).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-